<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  
<script>
  Promise.all([
    // new Promise((resolve, reject) => {
    //   $ajax({
    //     url: 'url1',
    //     success: function (data) {
    //       resolve(data)
    //     }
    //   })
    // }),
    // new Promise((resolve, reject) => {
    //   $ajax({
    //     url: 'url2',
    //     success: function (data) {
    //       resolve(data)
    //     }
    //   })
    // })

    new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve({name: 'why', age: 18})
      }, 2000);
    }),
    new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve({name: 'kobe', age: 19})
      }, 2000);
    })
  ]).then(results => {
    console.log(results)
  })
</script>
</body>
</html>